package CollectionsDemo;

import java.util.ArrayList;
import java.util.Collections;

public class CollectionsDemo1 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<Integer>();
        Collections.addAll(list, 123, 2, 1,  456, 789);
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
    }
}
